#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    int place;
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void paintEvent(QPaintEvent *event);
    void Initnumber();
    void keyPressEvent(QKeyEvent *event);
    void magic(int u,int*x,int*y,int*num,QRect &number,int place);
    QVector<int> num;
    QVector<int> x;
    QVector<int> y;
private slots:
    void num_fall();
void num_move();
private:
    Ui::MainWindow *ui;
    //QRect number;
    QTimer *timer;
    QTimer *timer2;
    int direct;//方向
    bool ifrun;//是否开始
    QVector<QRect> number;
    QString d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13;
};

#endif // MAINWINDOW_H
